﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using SM2TestRunner;

namespace Popups
{
    public partial class LoginInputs : Form
    {
        public LoginInputs()
        {
            InitializeComponent();
        }

        public static DialogResult ShowLoginInputs()
        {
            LoginInputs dialog = new LoginInputs();
            return dialog.ShowDialog();
        }
        private void btnOK_Click(object sender, EventArgs e)
        {
            InputDispatcher.TEST_PARAMETER = new TestParameters();
            string strUsername = tbUsername.Text.Trim();
            string strPassword = tbPassword.Text.Trim();
            string strValidate = rtbValidateTextPresent.Text.Trim();
            InputDispatcher.TEST_PARAMETER.add("Username", strUsername);
            InputDispatcher.TEST_PARAMETER.add("Password", strPassword);
            InputDispatcher.strValidationTextPresents = strValidate;
            this.Close();
        }

        private void btnDiscard_Click(object sender, EventArgs e)
        {
            this.Close();
        }
    }
}
